#pragma once

/*
 *防拷贝，该类的子类可以正常构造，但无法拷贝
 *要拷贝必先调父类的构造函数，而protected在子类中允许访问，外部无法访问
 */

class noncopyable
{
public:
    noncopyable(const noncopyable &) = delete;
    noncopyable &operator=(const noncopyable &) = delete;

protected:
    noncopyable() = default;
    ~noncopyable() = default;
};